home *** CD-ROM | disk | FTP | other *** search
- global gMachineType, fixPal, gWhichInterface, gMovieSprite, gPathName, gFileName, gFolderList, gFileList, gDirList, gDxrList, gCstList, gIniList, gDllList, gTxtList, gPicList, gSndList, gMovList, gSeparator
-
- on startMovie
- set the trace to 0
- if not (the quickTimePresent) then
- go("noQuickTime")
- go(the frame + 1)
- repeat while the mouseDown
- nothing()
- end repeat
- startTimer()
- repeat while (the timer < 640) and the mouseUp
- nothing()
- end repeat
- halt()
- end if
- unLoad()
- unloadMember()
- set gMachineType to the machineType
- if gMachineType <> 256 then
- if factory("FixPalette") = 0 then
- openXLib("WRONGPAL.XOB")
- end if
- if factory("FixPalette") <> 0 then
- set fixPal to fixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageBottom)
- fixPal(mPatchIt)
- end if
- end if
- setProp(1, 48, "puppet", 0)
- setProp(1, 48, "visibility", 1)
- set gMovieSprite to 15
- set the fileName of cast "INTRO.MOV" to the pathName & "DigiLogo.MOV"
- end
-
- on launchMovie
- if the machineType = 256 then
- set gSeparator to "\"
- else
- set gSeparator to ":"
- end if
- openFile(the pathName, "asia")
- if the result = 1 then
- exit
- end if
- if the machineType <> 256 then
- openFile("VSexAsia", "asia")
- if the result = 1 then
- exit
- end if
- end if
- set x to "I could not find any data files" & RETURN & "pertaining to this application." & RETURN & RETURN
- set x to x & "Please refer to any accompanying" & RETURN & QUOTE & "Read Me" & QUOTE & " files for further directions."
- alert(x)
- halt()
- end
-
- on openFile whichPath, whichFile
- if the last char in whichPath <> gSeparator then
- set whichPath to whichPath & gSeparator
- end if
- set gPathName to whichPath
- siftFileNames(gPathName)
- if not voidp(whichFile) then
- set gFileName to lowercase(whichFile)
- end if
- put RETURN
- attemptOpen(gDxrList, gFileName & ".dxr")
- if the result = 1 then
- return 1
- exit
- end if
- attemptOpen(gDirList, gFileName & ".dir")
- if the result = 1 then
- return 1
- exit
- end if
- attemptOpenBuild(gDirList, gFileName & ".dir")
- return the result
- end
-
- on siftFileNames whichPath
- set gFolderList to []
- set gFileList to []
- set gDirList to []
- set gDxrList to []
- set gCstList to []
- set gIniList to []
- set gDllList to []
- set gTxtList to []
- set gPicList to []
- set gSndList to []
- set gMovList to []
- set the itemDelimiter to "."
- set gFileName to lowercase(item 1 of the movie)
- repeat with x = 1 to the maxinteger
- set fileX to getNthFileNameInFolder(whichPath, x)
- set fileX to lowercase(fileX)
- case fileX of
- EMPTY:
- exit repeat
- otherwise:
- set fileExtension to char 1 to 3 of item 2 of fileX
- case fileExtension of
- EMPTY:
- append(gFolderList, fileX)
- otherwise:
- append(gFileList, fileX)
- case fileExtension of
- "dir":
- append(gDirList, fileX)
- "dxr":
- append(gDxrList, fileX)
- "cst":
- append(gCstList, fileX)
- "ini":
- append(gIniList, fileX)
- "dll":
- append(gDllList, fileX)
- "txt", "dat", "dta":
- append(gTxtList, fileX)
- "pct", "pic", "gif":
- append(gPicList, fileX)
- "aif", "snd", "wav":
- append(gSndList, fileX)
- "avi", "mov":
- append(gMovList, fileX)
- end case
- end case
- end case
- end repeat
- set the itemDelimiter to ","
- end
-
- on attemptOpen whichList, whichName
- case getPos(whichList, whichName) of
- 0:
- put "Attempt to open '" & gPathName & whichName & "' failed."
- return 0
- exit
- otherwise:
- put "Attempt to open '" & gPathName & whichName & "' successful."
- go(1, gPathName & whichName)
- return 1
- abort()
- exit
- end case
- end
-
- on attemptOpenBuild whichList, whichName
- set maxCount to count(whichList)
- repeat with x = maxCount down to 1
- set whichFile to getAt(whichList, x)
- if char 1 to the number of chars in whichName of whichFile = whichName then
- put "Attempt to open '" & gPathName & whichFile & "' successful."
- go(1, gPathName & whichFile)
- return 1
- abort()
- exit
- end if
- end repeat
- put "Attempt to open a build version of '" & gPathName & whichName & "' failed."
- return 0
- end
-
- on makeList listList
- if listp(listList) then
- set countList to count(listList)
- repeat with x = 1 to countList
- set whichList to getAt(listList, x)
- do("global " & whichList)
- do("set " & whichList & "=[ ]")
- do("sort " & whichList)
- end repeat
- else
- if stringp(listList) then
- do("global " & listList)
- do("set " & listList & "=[ ]")
- do("sort " & listList)
- end if
- end if
- end
-
- on lowercase whichPhrase
- set newPhrase to EMPTY
- set numChars to the number of chars in whichPhrase
- repeat with x = 1 to numChars
- set charX to char x of whichPhrase
- set charToNumX to charToNum(charX)
- if (charToNumX > 64) and (charToNumX < 91) then
- set charX to numToChar(charToNumX + 32)
- end if
- set newPhrase to newPhrase & charX
- end repeat
- return newPhrase
- end
-
- on uppercase whichPhrase
- set newPhrase to EMPTY
- set numChars to the number of chars in whichPhrase
- repeat with x = 1 to numChars
- set charX to char x of whichPhrase
- set charToNumX to charToNum(charX)
- if (charToNumX > 96) and (charToNumX < 123) then
- set charX to numToChar(charToNumX - 32)
- end if
- set newPhrase to newPhrase & charX
- end repeat
- return newPhrase
- end
-
- on setInterface whichSprite, whichInterface
- repeat while the mouseDown
- updateStage()
- end repeat
- puppetSprite(9, 0)
- set gWhichInterface to whichInterface
- go(the frame + 1)
- end
-
- on setProp startSprite, endSprite, whichProp, whichValue
- repeat with x = startSprite to endSprite
- do("set the " & whichProp & " of sprite x=whichValue")
- end repeat
- end
-
- on delayFor howLong
- set howLong to the timer + howLong
- repeat while the timer < howLong
- updateStage()
- end repeat
- end
-